<?php
//载入ucpass类
require_once('lib/Ucpaas.class.php');

//初始化必填
$options['accountsid']='1351b3e15b53332b9f9dba3f45635c62';
$options['token']='02b65fcde0d8556f161f82bee9e7210a';


//初始化 $options必填
$ucpass = new Ucpaas($options);

//开发者账号信息查询默认为json或xml

echo $ucpass->getDevinfo('xml');

//短信验证码（模板短信）,默认以65个汉字（同65个英文）为一条（可容纳字数受您应用名称占用字符影响），超过长度短信平台将会自动分割为多条发送。分割后的多条短信将按照具体占用条数计费。
$appId = "51db68b38c63432891864a1c52365761";
$to = "13673684231";
$templateId = "40055";
$code = rand(10000,99999);
$param=$code;

echo $ucpass->templateSMS($appId,$to,$templateId,$param);